<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>教师选课页面</title>
    <link rel="stylesheet" th:href="@{/static/css/semantic.min.css}">
    <link rel="stylesheet" th:href="@{/static/JS/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/static/JS/layui/css/modules/code.css}">
    <script th:src="@{/static/JS/jquery-3.5.1.js}"></script>
    <script th:src="@{/static/JS/semantic.min.js}"></script>
    <script th:src="@{/static/JS/layui/layui.js}"></script>
    <style>
        body,div{
            margin: 0;
            padding: 0;
        }
        #ce{
            font-weight: bold;
            position: fixed;
            height: 100%;
            padding-top: 50px;
            margin: 0;
        }
        a{
            text-align: center;
        }
    </style>
</head>
<script th:src="@{/static/JS/Teacher/chose_teacher.js}"></script>
<body style="width: 100%;height: 100%">
    <div style="height: 100%;width: 200px;">
        <ul class="layui-nav layui-nav-tree" lay-filter="test" id="ce">
            <li class="layui-nav-item layui-nav-itemed"> <a class="" href="#"><i class="layui-icon">&nbsp;</i>个人课程<span class="layui-nav-more"></span></a>
                <!--        layui-this      -->
                <dl class="layui-nav-child">
                    <dd class="layui-this"><a th:href="@{/chose_teacher}">教师选课</a></dd>
                    <dd class=""><a th:href="@{/look_students}">学生选课情况</a></dd>
                    <dd class=""><a th:href="@{/holidays_teacher}">学生请假情况</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item layui-nav-itemed"> <a class="" href="#"><i class="layui-icon">&nbsp;</i>个人信息<span class="layui-nav-more"></span></a>
                <dl class="layui-nav-child">
                    <dd class=""><a th:href="@{/set_teacher}">密码修改</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item layui-nav-itemed"> <a class="" href="#"><i class="layui-icon">&nbsp;</i>其他<span class="layui-nav-more"></span></a>
                <dl class="layui-nav-child">
                    <dd class=""><a th:href="@{/admin}">进入后台</a>
                    </dd>
                </dl>
            </li>
            <span class="layui-nav-bar" style="top: 352.5px; height: 0px; opacity: 0;"></span>
        </ul>
        <div style="top: 60px;position: absolute;margin-left: 500px;">
            <div style="text-align:center;clear:both;position:absolute;left:0;top:0;width: 1200px;height: 800px;">
                <h1  class="ui header,ui center aligned header" style="color: #000000;margin-top: 10px">教师选课</h1>
                <div >
                    <div style="top: 20px;margin-top: 20px;margin-left: 20px;font-size: 30px;">
                        <div id="h2" style="margin-bottom: 20px;color: #020202;display: inline-block;"></div>&nbsp;
                        <div id="h3" style="margin-bottom: 20px;color: #000000;display: inline-block;"></div>
                        <h6 id="h6" hidden>[[${login}]]</h6>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <button  class="ui secondary button" onclick="location.href='out'" style="position: absolute;right: 30px;top: 26px;">注销</button>
    <!--选课区域-->
    <div style="margin-left: 200px;position:absolute;top: 190px;right: 30px;left: 30px;">
        <table class="ui celled striped table" style="font-weight: bold;" id="t1">
            <thead>
            <tr><th style="text-align: center">科目</th>
                <th style="text-align: center">老师</th>
                <th style="text-align: center"></th>
            </tr></thead>
            <tbody id="tbody" style="text-align: center">
                <tr th:each="_class,_Class:${list}">
                    <td th:text="${_class.getClassname()}" id="class_" name="class"></td>
                    <td>
                        <span th:text="${_class.getTeacher()}!='0'?${_class.getTeacher()}:'无教师'" name="name"></span>
                    </td>
                    <td>
                        <input type="button" value="选中"
                               name="btn"
                               class="ui button" th:if="${_class.getTeacher()}=='0'"/>
                        <input type="button" value="选中"
                               name="btn"
                               class="ui button" th:if="${_class.getTeacher()}!='0'" disabled="disabled"/>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</body>
</html>